{{ $data := index site.Data site.Language.Lang }}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-12 text-center">
            <div class="row justify-content-center text-center pt-4 pb-4 d-lg-none">
                {{ range $index, $item := $data.heromain.carousel }}
                {{- if eq $index 0}}
                <div class="col-12">
                    <h1 class="display-2 font-weight-bolder mb-3">{{ .title }}</h1>
                    <p class="display-4 font-weight-light">
                        {{ .subtitle }}
                    </p>
                    <p class="lead mb-4">{{ .content }}
                    </p>
                    <p class="d-flex flex-column flex-wrap flex-md-row justify-content-md-center">
                        <a href="{{ .url }}" class="btn btn-tertiary animate-up-2">
                            {{ .buttonTitle }}
                        </a>
                    </p>
                </div>
                {{ end }}
                {{ end }}
            </div>
            <div id="carouselMainPage" class="carousel slide d-none d-lg-block" data-ride="carousel">
                <ol class="carousel-indicators">
                    {{ range $index, $item := $data.heromain.carousel }}
                    <li data-target="#carouselMainPage" data-slide-to="{{$index}}" {{- if eq $index 0}}
                        class="active" {{- end}}></li>
                    {{ end }}
                </ol>
                <div class="carousel-inner">
                    {{ range $index, $item := $data.heromain.carousel }}
                    <div class="carousel-item  {{- if eq $index 0}}
                    active{{- end}}" style="height: 400px;">
                        <div class="container">
                            <div class="row justify-content-center d-flex align-items-center" style="height: 400px;">
                                <div class="col-12 col-lg-9 text-center">
                                    <h1 class="display-{{ .displayTitle }} font-weight-bolder mb-3">{{ .title }}</h1>
                                    <p class="display-4 font-weight-light"> {{ .subtitle }} </p>
                                    <p class="lead mb-4"> {{ .content }}
                                    </p>
                                    <p class="d-flex flex-column flex-wrap flex-md-row justify-content-md-center">
                                        <a href="{{ .url }}" class="btn btn-tertiary animate-up-2">
                                            {{ .buttonTitle }}
                                        </a>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                    {{ end }}
                </div>
                <a class="carousel-control-prev" href="#carouselMainPage" role="button" data-slide="prev">
                    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="carousel-control-next" href="#carouselMainPage" role="button" data-slide="next">
                    <span class="carousel-control-next-icon" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
        </div>
    </div>
</div>